feat(sidebar): drag-resize content width with a mouse handle - #49
Merged
Conversation
Invisible 1-col grab zone on the sidebar's left edge. Drag sets a session-only width override (view.tocWidthOverride); double-click resets to auto width. A full-screen drag shield owns the drag stream so capture survives the pointer leaving the 1-col handle on the first motion. Width override lives in the view-state store; clamp helpers are pure in sidebar-resize.ts.
Drag the seam to set a session-only content max-width override, lifting the configured cap so wide terminals reclaim the dead space as readable content in both drag directions. The TOC stays auto-width and rides the seam. Double-click clears the override. App owns the gesture (onSeamDown) so double-click reset works whether the second press lands on the handle or the drag shield; a drag clears the double-click timer so a drag's mousedown never pairs with the next click.
Startup benchmark (
|
| build | mean | ratio | verdict |
|---|---|---|---|
| baseline (main@416931a) | 723.5ms ± 10.4ms | — | |
| PR | 719.7ms ± 13.6ms | 0.99× | ✅ ok |
Thresholds: warn ≥ 1.1×, fail ≥ 1.25×. Baseline built from main.
denolfe
marked this pull request as ready for review
August 13, 2026 23:49
denolfe
added a commit
that referenced
this pull request
Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes scrollbar draggable. Content flows to width of content view. Double-clicking resets the resize.
CleanShot.2026-08-13.at.19.47.01.mp4
Key Changes
contentWidthOverridefrom the seam column. It lifts the configured cap, so content grows past 100 cols and the TOC rides along.